package com.sup.generator.service.imp;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sup.generator.entity.GrMenuEntity;
import com.sup.generator.mapper.GrMenuMapper;
import com.sup.generator.service.GrMenuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Zh
 * @version v1.0
 * @description:
 * @date 2020/11/13 15:28
 */
@Service("grMenuServiceImp")
public class GrMenuServiceImp extends ServiceImpl<GrMenuMapper, GrMenuEntity> implements GrMenuService {

    @Override
    public List<GrMenuEntity> getByUserId(Long userId) {
        GrMenuEntity grMenuEntity = GrMenuEntity.getGrMenuEntity();
        grMenuEntity.setUId(userId);
        QueryWrapper queryWrapper = new QueryWrapper(grMenuEntity);
        return list(queryWrapper);
    }
}
